using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
	[Table("HrmPsEmpNameHistory")]
    public class PsEmpNameHistory
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "NameHisId", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public int NameHisId { get; set; }

		[ForeignKey("Emp")]
		[DataMember, Display(Name = "EmpId", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public Nullable<int> EmpId { get; set; }

		[DataMember, Display(Name = "ChangedRefNo", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public string ChangedRefNo { get; set; }

		[DataMember, Display(Name = "ChangedDate", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public Nullable<System.DateTime> ChangedDate { get; set; }

		[ForeignKey("OldPrefix")]
		[DataMember, Display(Name = "OldPrefixId", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public Nullable<int> OldPrefixId { get; set; }

		[DataMember, Display(Name = "OldName", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public string OldName { get; set; }

		[DataMember, Display(Name = "OldLastName", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public string OldLastName { get; set; }

		[ForeignKey("NewPrefix")]
		[DataMember, Display(Name = "NewPrefixId", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public Nullable<int> NewPrefixId { get; set; }

		[DataMember, Display(Name = "NewName", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public string NewName { get; set; }

		[DataMember, Display(Name = "NewLastName", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public string NewLastName { get; set; }

		[DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public string Remarks { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.PsEmpNameHistoriesResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        public virtual HRM.Employee Emp { get; set; }

        public virtual HRM.MasNamePrefix OldPrefix { get; set; }

		public virtual HRM.MasNamePrefix NewPrefix { get; set; }

    }
}